﻿@model prav.Models.NewPostViewModel
@{
    ViewBag.Title = "Добавление новой записи";
}

<h4>Добавление новой записи</h4>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <div class="editor-label">
            @Html.LabelFor(model => model.Header)
        </div>
        
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Header, new { @class = "postEdit" })
            @Html.ValidationMessageFor(model => model.Header)
        </div>

        <div class="editor-label" style="margin-top: 5px">
            @Html.LabelFor(model => model.Body)
        </div>

        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body, new { @class = "postEdit", cols = 60, rows = 20})
            @Html.ValidationMessageFor(model => model.Body)
        </div>
        @Html.HiddenFor(model => model.ParentId)
        <button type="submit" class="btn btn-primary btn-large" style="margin-top: 5px; width: 800px">Добавить</button>
</fieldset>
}    
